/// @description : 用户信息
class UserEntity {
  int uid = 0;
  int cid = 0;
  String username = '';
  String password = '';
  String name = '';
  String mobile = '';
  String avatar = '';
  String token = '';
  String shop_name = '';
  int exp = 0;
  int group_id = 0;
  int point = 0;
  int role_id = 0;
  int shop_id = 0;
  int status = 0;

  UserEntity({
    required this.uid,
    required this.name,
    required this.mobile,
    required this.avatar,
    required this.token,
    required this.exp,
    required this.group_id,
    required this.point,
    required this.role_id,
    required this.shop_id,
    required this.status,
  });
  UserEntity.fromJson(Map<dynamic, dynamic> json) {
    // print('UserEntity.fromJson=$json');
    uid = json["uid"];
    cid = json["cid"];
    name = json["name"].toString();
    mobile = json["mobile"].toString();
    avatar = json["avatar"].toString();
    token = json["token"].toString();
    // exp = json["exp"].toInt();
    exp = json["exp"];
    group_id = json["group_id"];
    point = json["point"];
    role_id = json["role_id"];
    shop_id = json["shop_id"];
    shop_name = json["shop_name"];
    status = json["status"];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data["uid"] = uid;
    data["cid"] = cid;
    data["username"] = username;
    data["password"] = password;
    data["name"] = name;
    data["mobile"] = mobile;
    data["avatar"] = avatar;
    data["token"] = token;
    data["exp"] = exp;
    data["group_id"] = group_id;
    data["point"] = point;
    data["role_id"] = role_id;
    data["shop_id"] = shop_id;
    data["shop_name"] = shop_name;
    data["status"] = status;
    return data;
  }
}
